using System;
using System.Collections.Generic;
using System.Linq;
using MvcMall.Core.Contacts.Repositories;
using MvcMall.Core.Domains;
using NHibernate.Linq;

namespace MvcMall.Data.Repositories
{
    public class AdminPowerRepository : DataRepository<AdminPower>, IAdminPowerRepository
    {

        public List<AdminPower> GetByIds(List<int> editPowers)
        {
            if(editPowers== null || editPowers.Count == 0)
                return null;
            return Session.Query<AdminPower>()
                .Where(m => editPowers.Contains(m.Id))
                .ToList();
        }
    }
}